package com.javacoo.junit.generator.enmus;

/**
 * 模板类型
 * <li></li>
 *
 * @author: duanyong@jccfc.com
 * @since: 2021/1/5 13:49
 */
public enum TemplateTypeEnum {
    TEMPLATE_TYPE_ENUM_DEFAULT("default","DefaultTemplate.ftl"),
    TEMPLATE_TYPE_SPRING("spring","SpringTemplate.ftl");

    private String code;
    private String value;

    TemplateTypeEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }
    public static String getEnumCode(String code){
        for (TemplateTypeEnum status:values()){
            if(status.getCode().equals(code)){
                return status.getCode();
            }
        }
        return "";
    }
    public static String getEnumValue(String code){
        for (TemplateTypeEnum status:values()){
            if(status.getCode().equals(code)){
                return status.getValue();
            }
        }
        return "";
    }
    public static boolean contains(String code){
        for (TemplateTypeEnum status:values()){
            if(status.getCode().equals(code)){
                return true;
            }
        }
        return false;
    }
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
